pp108 : Using the Execute Condition

Using the Execute Condition

This topic describes the Execute Condition used in modeling a business process.


The Execute Condition enables business analysts to specify whether the activity should be executed during run time. The associated message map assignments are performed only if the activity is executed. This feature is useful when only one path contains the Activity and the other is modeled asDefaultin a process model. You can see a small Decision icon at the bottom left of the construct to indicate that the activity includes a condition to be executed. The constructs for which the Execute Condition can be specified are as follows:

  • Activity
  • Send Message event
  • Delay
  • Independent Sub-processes
  • While
  • Until
  • For Each
  • Embedded Sub-Process

    For example, you are modeling a business process model where the process checks the re-order level for each product. When the re-order level for a product is reached, a notification is sent to the Purchase Manager to order stock.

    In the above example if a business process model is modeled without an Execute Condition, the business process model appears as follows:


    If you are modeling the above business process using the Execute Condition, the business process model appears as follows:


    You can specify the Execute Condition in one of the following ways:

  1. In the properties of the above constructs you can specify the condition as /count > 0 in the Execute Condition text box.
  2. Alternatively, you can enable the Read Execute Condition from Message check box so that the Execute Condition is picked up dynamically at runtime from the Input Message element of the process; it can also be read by a Web service and be used for all the specified constructs in the business process model. For example, the condition element must contain a condition count > 0 on run time in the Message Map and the condition will be evaluated, based on which the activity is executed.
    At runtime:

    If the Execute Condition is evaluated as...

    Description

    True

    The specified construct is executed.

    False

    The specified construct is skipped and will not be executed.

    Blank (no value is specified)

    The construct is always executed.



    Note: If the message is not defined in the XPath of the condition, the condition is evaluated as "false". For example, consider the condition /GetemployeesResponse/Employee/EmployeeBalance > 100. If the XPath is not found in the Message Map, this condition will be marked as "false" even though the condition has not been evaluated. This is done to ensure that the process does not wait endlessly for the message to be present in the Message Map. The Wait for Message attribute applies to While, For Each, Until, Decision, Execute Condition, and Debug conditions.

Related concepts

Crash Recovery
Reliable Messaging

Related tasks

Setting the Properties of an Activity